implementation for savings goals persistence#439
Merged
Olowodarey merged 3 commits intoDevsol-01:mainfrom Mar 27, 2026
Merged
Conversation
Replace ternary expression statement with explicit if-else block to comply with @typescript-eslint/no-unused-expressions rule.
Create migration to support SavingsGoal entity with:
- UUID primary key with auto-generation
- Foreign key to users table with CASCADE delete
- Goal parameters (name, target amount, target date)
- Status enum (IN_PROGRESS, COMPLETED)
- JSONB metadata column for frontend-controlled display data
- Audit timestamps (createdAt, updatedAt)
- Performance indexes on userId, status, and targetDate
This enables users to set localized savings goals ("Buy a Car",
"Summer Vacation") connected to their yield pools.
Repo Avatar Devsol-01/Nestera
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@Bhenzdizma Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR completes the requested implementation for savings goals persistence and verifies that the required Soroban contract read functionality is already in place.
In addition to the new database migration, this PR includes a small code quality fix in the indexer service and confirms that the relevant backend and blockchain-read components already satisfy the requested requirements.
✅ What Was Already Implemented
SavingsGoalentityThe
SavingsGoalentity already exists insavings-goal.entity.tswith the required structure, including:iduserIdgoalNametargetAmounttargetDatestatusIt also includes:
JSONBmetadatacolumn for frontend customizationimageUrliconRefcolorSavingsModuleSoroban contract reads
Soroban read support was already implemented in
stellar.service.tsthroughinvokeContractRead().The existing implementation already provides:
RpcClientWrapperfailover and retry supportSorobanRpc.ServerinstantiationscValresponse parsing to JavaScript primitives viascValToNative()✨ What Was Implemented in This PR
Database migration
Added
1775100000000-CreateSavingsGoalsTable.tsto create thesavings_goalstable with the required schema.This migration includes:
savings_goalstableusersCASCADEdelete behavioruserIdstatustargetDateJSONBmetadata column for flexible frontend customizationCode quality fix
Updated
indexer.service.tsto fix an ESLint issue:no-unused-expressionsif / elseblock🧪 Validation Results
All checks passed successfully:
📦 Outcome
This PR ensures that savings goals are now fully backed by a database migration, while also confirming that the required entity model and Soroban contract read infrastructure were already correctly implemented.
The result is:
🔄 Breaking Changes
None.
This PR is additive and corrective only. Existing functionality remains intact.
closes #399
closes #400